#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#define MaxSize 100
typedef char DataType;
typedef struct {
	DataType data[MaxSize];
	int top;
}Stack;
void InitStack(Stack* &s)
{
	s = (Stack*)malloc(sizeof(Stack));
	s->top = -1;
}
void InitStack(Stack*& s)
{
	s = (Stack*)malloc(sizeof(Stack));
	s->top = -1;
}
void DestroyStack(Stack* &s)
{
	free(s);
}
bool StackEmpty(Stack* s)
{
	return (s->top == -1);
}
bool StackPush(Stack* &s,DataType e)
{
	if (s->top == MaxSize - 1)
		return false;
	s->top++;
	s->data[s->top] = e;
	return true;
}
bool StackPush(Stack* &s,DataType e)
{
	if (s->top == MaxSize - 1)
		return false;
	s->data[s->top] = e;
	s->top++;
	return true;
}
bool PopStack(Stack*& s,DataType &e)
{
	if (s->top == -1)
		return false;
	e = s->data[s->top];
	s->top--;
	return true;
}
bool PopStack(Stack* &s,DataType &e)
{
	if (s->top == -1)
		return false;
	e = s->data[s->top];
	s->top--;
	return true;
}
bool GetTop(Stack* s,DataType &e)
{
	if (s->top == -1)
		return false;
	e = s->data[s->top];
	return true;
}
bool GetTop(Stack* s,DataType &e)
{
	if (s->top == -1)
		return false;
	e = s->data[s->top];
	return true;
}